IterativeMethod Derived Type

type, public :: IterativeMethod


Inherits

type~~iterativemethod~~InheritsGraph type~iterativemethod IterativeMethod type~iterativemethodrequirements IterativeMethodRequirements type~iterativemethod->type~iterativemethodrequirements requirements type~methodpreconditioner MethodPreconditioner type~iterativemethod->type~methodpreconditioner preconditioner_type type~methodtypeiterative MethodTypeIterative type~iterativemethod->type~methodtypeiterative method_type

Inherited by

type~~iterativemethod~~InheritedByGraph type~iterativemethod IterativeMethod type~linalg linalg type~linalg->type~iterativemethod iterative

Type-Bound Procedures

procedure, public :: set_method

  • private subroutine set_method(this, method)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    type(MethodTypeIterative), intent(in) :: method

procedure, public :: solve => IterativeMethod_solve

  • private function IterativeMethod_solve(this, A, b, params, verbose) result(x)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(in) :: this
    real(kind=dp), intent(in), DIMENSION(:, :) :: A
    real(kind=dp), intent(in), DIMENSION(:) :: b
    type(IterativeParams), intent(inout) :: params
    type(Logger), optional :: verbose

    Return Value real(kind=dp), DIMENSION(SIZE(A, 1))

procedure, public :: Init_IterativeParams

  • private function Init_IterativeParams(this, N, A, x0, max_iter_choice, epsi_tol, omega, method_preconditioner, alpha, is_stationary, is_strict_mode) result(params)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    integer, intent(in) :: N
    real(kind=dp), intent(in), optional, DIMENSION(:, :) :: A
    real(kind=dp), intent(in), optional, DIMENSION(:) :: x0
    integer, intent(in), optional :: max_iter_choice
    real(kind=dp), intent(in), optional :: epsi_tol
    real(kind=dp), intent(in), optional :: omega
    type(MethodPreconditioner), intent(in), optional :: method_preconditioner
    real(kind=dp), intent(in), optional :: alpha
    logical, intent(in), optional :: is_stationary
    logical, intent(in), optional :: is_strict_mode

    Return Value type(IterativeParams)

procedure, public :: Dealocate_IterativeParams

  • private subroutine Dealocate_IterativeParams(this, params, success)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    type(IterativeParams), intent(inout) :: params
    logical, intent(out), optional :: success

procedure, public :: test_matrix

  • private subroutine test_matrix(this, A, params)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    real(kind=dp), intent(in), DIMENSION(:,:) :: A
    type(IterativeParams), intent(in) :: params

Source Code

    TYPE :: IterativeMethod
        PRIVATE
        TYPE(MethodTypeIterative) :: method_type = METHOD_ITERATIVE_NONE
        TYPE(MethodPreconditioner) :: preconditioner_type = METHOD_PRECOND_NONE
        TYPE(IterativeMethodRequirements) :: requirements
        PROCEDURE(solve_interface_Iterative), PASS(this), POINTER :: solve_method => NULL()

        CONTAINS

        PROCEDURE :: set_method => set_method
        PROCEDURE :: solve => IterativeMethod_solve
        PROCEDURE :: Init_IterativeParams => Init_IterativeParams
        PROCEDURE :: Dealocate_IterativeParams => Dealocate_IterativeParams
        PROCEDURE :: test_matrix => test_matrix

    END TYPE IterativeMethod